\(\int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx\) [815]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [C] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 28 \[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=\frac {x^2 \sqrt {a+b x}}{2 \sqrt {-a-b x}} \]

[Out]

1/2*x^2*(b*x+a)^(1/2)/(-b*x-a)^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {23, 30} \[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=\frac {x^2 \sqrt {a+b x}}{2 \sqrt {-a-b x}} \]

[In]

Int[(x*Sqrt[a + b*x])/Sqrt[-a - b*x],x]

[Out]

(x^2*Sqrt[a + b*x])/(2*Sqrt[-a - b*x])

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {a+b x} \int x \, dx}{\sqrt {-a-b x}} \\ & = \frac {x^2 \sqrt {a+b x}}{2 \sqrt {-a-b x}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00 \[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=\frac {x^2 \sqrt {a+b x}}{2 \sqrt {-a-b x}} \]

[In]

Integrate[(x*Sqrt[a + b*x])/Sqrt[-a - b*x],x]

[Out]

(x^2*Sqrt[a + b*x])/(2*Sqrt[-a - b*x])

Maple [A] (verified)

Time = 1.74 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82

method result size
gosper \(\frac {x^{2} \sqrt {b x +a}}{2 \sqrt {-b x -a}}\) \(23\)
default \(-\frac {\sqrt {-b x -a}\, x^{2}}{2 \sqrt {b x +a}}\) \(23\)
risch \(-\frac {i \sqrt {\frac {-b x -a}{b x +a}}\, \sqrt {b x +a}\, x^{2}}{2 \sqrt {-b x -a}}\) \(42\)

[In]

int(x*(b*x+a)^(1/2)/(-b*x-a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*x^2*(b*x+a)^(1/2)/(-b*x-a)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.54 \[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=-\frac {\sqrt {-b^{2}} x^{2}}{2 \, b} \]

[In]

integrate(x*(b*x+a)^(1/2)/(-b*x-a)^(1/2),x, algorithm="fricas")

[Out]

-1/2*sqrt(-b^2)*x^2/b

Sympy [F]

\[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=\int \frac {x \sqrt {a + b x}}{\sqrt {- a - b x}}\, dx \]

[In]

integrate(x*(b*x+a)**(1/2)/(-b*x-a)**(1/2),x)

[Out]

Integral(x*sqrt(a + b*x)/sqrt(-a - b*x), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate(x*(b*x+a)^(1/2)/(-b*x-a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negative exponent.

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.28 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.75 \[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=-\frac {i \, {\left ({\left (b x + a\right )}^{2} - 2 \, {\left (b x + a\right )} a\right )}}{2 \, b^{2}} \]

[In]

integrate(x*(b*x+a)^(1/2)/(-b*x-a)^(1/2),x, algorithm="giac")

[Out]

-1/2*I*((b*x + a)^2 - 2*(b*x + a)*a)/b^2

Mupad [F(-1)]

Timed out. \[ \int \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \, dx=\int \frac {x\,\sqrt {a+b\,x}}{\sqrt {-a-b\,x}} \,d x \]

[In]

int((x*(a + b*x)^(1/2))/(- a - b*x)^(1/2),x)

[Out]

int((x*(a + b*x)^(1/2))/(- a - b*x)^(1/2), x)